package com.telephone.purchase.controller;

import com.telephone.purchase.entity.Order;
import com.telephone.purchase.model.OrderInfoResponse;
import com.telephone.purchase.service.OrderInfoServie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author fengyingeng
 * @date 2019/9/5 10:03
 * Description:
 */
@RestController
@CrossOrigin
@RequestMapping("/v1")
public class OrderController {

    @Autowired
    private OrderInfoServie orderInfoServie;

    @GetMapping("/getOrderInfo")
    public List<OrderInfoResponse> getOrderList(@RequestParam("phoneNumber") String phoneNumber){
        return orderInfoServie.getListInfos(phoneNumber);
    }
}
